package fitnesshub.context;

/*
 * 写的时候不太懂，每个线程都有自己的ThreadLocal,所以这里是多余的，但能正常用
**/
public class MemberContext {
    public static ThreadLocal<Integer> threadLocal = new ThreadLocal<>();

    public static void setCurrentMemberId(Integer id) {
        threadLocal.set(id);
    }

    public static Integer getCurrentMemberId() {
        return threadLocal.get();
    }

    public static void removeCurrentMemberId() {
        threadLocal.remove();
    }
}
